<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
	<head>
	     
		<title><s:property value='%{getText("d_title")}' /></title>
		<link href="/SCMDB/style/SuperEdit.css" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="/SCMDB/js/Super.js"></script>
		<script type="text/javascript"
			src="/SCMDB/js/My97DatePicker/WdatePicker.js"></script>
		<%@ include file="../commonPage/message.jsp"%>
	</head>
	<body>
	<div class="main">
	  <s:form action="empReportAction!findDayReport" theme="simple"
				method="post">
	    <fieldset class="fieldSearch">
	      <legend>
	        <s:property value='%{getText("d_legend")}' />
          </legend>
	      <table border="0">
	        <tr>
	          <td width="7%" align="right" class="p_8"><s:property value='%{getText("emp_new_xm")}' /></td>
	          <td width="13%"><s:textfield name="empName" cssClass="sInput" /></td>
	          <td width="7%" align="right" class="p_14"><s:property value='%{getText("emp_new_kh")}' /></td>
	          <td width="17%"><s:textfield name="labelID" cssClass="sInput" /></td>
	          <td width="8%" align="right" class="p_14"><s:property value='%{getText("emp_new_bm")}' /></td>
	          <td width="21%"><s:select list="#session.depList" name="depID" listKey="id"
									listValue="deptName" headerKey="0" headerValue="--请选择--"></s:select></td>
	          <td width="10%" align="right" class="p_14"><s:property value='%{getText("emp_new_zw")}' /></td>
	          <td width="17%"><s:select name ="dutyID" list="#session.dutyList" listKey="id" listValue="name" headerKey="0" headerValue="--请选择--"></s:select></td>
            </tr>
	        <tr>
	          <td align="right" class="p_14"><s:property value='%{getText("emp_new_gz")}' /></td>
	          <td><s:select name ="workTypeID" list="#session.workTypeList" listKey="id" listValue="name" headerKey="0" headerValue="请选择"></s:select></td>
	          <td align="right" class="p_8"><s:property value='%{getText("d_sTime")}' /></td>
	          <td><s:textfield id="inTime" name="entity.inTime"
									cssClass="timeInput" title="开始时间" readonly="true"
									onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></s:textfield></td>
	          <td align="right" class="p_14"><s:property value='%{getText("d_eTime")}' /></td>
	          <td><s:textfield id="outTime" name="entity.outTime"
									cssClass="timeInput" title="结束时间" readonly="true"
									onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></s:textfield></td>
	          <td colspan="3"><input type="button" id="bSearch" name="search" class="bSearch"
						value="查询" onclick="loading()" />
	            <input type="button" id="excel" name="excel" class="bExcel"
						value="导出Excel"
						onclick="location.href='empReportAction!dayExcelReport.action'" /></td>
            </tr>
          </table>
        </fieldset>
	    <table border="0" cellspacing="1" cellpadding="1" class="tableList">
	      <thead>
	        <tr>
	          <th width="30" height="30" class="number"> <s:property value='%{getText("emp_th1")}' />
              </th>
	          <th> <s:property value='%{getText("emp_th2")}' />
              </th>
	          <th> <s:property value='%{getText("emp_th3")}' />
              </th>
	          <th> <s:property value='%{getText("emp_th5")}' />
              </th>
	          <th> <s:property value='%{getText("d_xiajingTime")}' />
              </th>
	          <th> <s:property value='%{getText("d_inTime")}' />
              </th>
	          <th> <s:property value='%{getText("d_outTime")}' />
              </th>
              <th> <s:property value='%{getText("d_shiftName")}' />
              </th>
	          <th> <s:property value='%{getText("d_gong")}' />
              </th>
            </tr>
          </thead>
	      <tbody>
	        <s:iterator id="pageBean" value="#session.empDayReportBean.list"
							status="u">
	          <tr>
	            <td class="number"> ${entity.index+u.index} </td>
	            <td><a onclick="showDetail('${pageBean.empID}')"  style="color:blue;cursor:pointer;">${pageBean.labelID}</a></td>
	            <td> ${pageBean.empName} </td>
	            <td> ${pageBean.depName} </td>
	            <td> ${pageBean.realTime}
	              <s:property value='%{getText("d_fengz")}' /></td>
	            <s:iterator id="map" value="#pageBean.dataMap">
	              <td><s:property value='key.toString("yyyy-MM-dd HH:mm:ss")' /></td>
	              <td><s:property value='value.toString("yyyy-MM-dd HH:mm:ss")' /></td>
                </s:iterator>
                <td>${pageBean.shiftName}</td>
	            <td> ${pageBean.gong} </td>
              </tr>
            </s:iterator>
	        <tr>
	          <td colspan="9" class="turnPage"><jsp:include flush="true" page="../commonPage/page.jsp">
	            <jsp:param name="entity" value="entity" />    
	            </jsp:include></td>
            </tr>
          </tbody>
        </table>
	    <div id="loading" style="display: none;"></div>
      </s:form>
    </div>
	</body>
</html>
<script>
function showDetail(empID){
	document.forms[0].action="/SCMDB/labelIOAction!findHisDetail.action?id="+empID;
	document.forms[0].submit();
}
</script>
